Optimal. Leaf size=54 \[ \frac {i \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {x \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i x^2}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3719, 2190, 2279, 2391} \[ \frac {i \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {x \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i x^2}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3719
Rubi steps
\begin {align*} \int x \tan (a+b x) \, dx &=\frac {i x^2}{2}-2 i \int \frac {e^{2 i (a+b x)} x}{1+e^{2 i (a+b x)}} \, dx\\ &=\frac {i x^2}{2}-\frac {x \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {\int \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b}\\ &=\frac {i x^2}{2}-\frac {x \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {i \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^2}\\ &=\frac {i x^2}{2}-\frac {x \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{2 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 54, normalized size = 1.00 \[ \frac {i \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {x \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i x^2}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.55, size = 122, normalized size = 2.26 \[ -\frac {2 \, b x \log \left (-\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \, b x \log \left (-\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) + i \, {\rm Li}_2\left (\frac {2 \, {\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) - i \, {\rm Li}_2\left (\frac {2 \, {\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right )}{4 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \tan \left (b x + a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.24, size = 78, normalized size = 1.44 \[ \frac {i x^{2}}{2}+\frac {2 i a x}{b}+\frac {i a^{2}}{b^{2}}-\frac {x \ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )}{b}+\frac {i \polylog \left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{2 b^{2}}-\frac {2 a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.15, size = 92, normalized size = 1.70 \[ -\frac {-i \, b^{2} x^{2} + 2 i \, b x \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + b x \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - i \, {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right )}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.46, size = 129, normalized size = 2.39 \[ -\frac {\pi \,\ln \left (\cos \left (b\,x\right )\right )+\mathrm {polylog}\left (2,-{\mathrm {e}}^{-a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-b\,x\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}-\pi \,\ln \left ({\mathrm {e}}^{-a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-b\,x\,2{}\mathrm {i}}+1\right )+2\,a\,\ln \left ({\mathrm {e}}^{-a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-b\,x\,2{}\mathrm {i}}+1\right )-\pi \,\ln \left ({\mathrm {e}}^{b\,x\,2{}\mathrm {i}}+1\right )+b^2\,x^2\,1{}\mathrm {i}-\ln \left (\cos \left (a+b\,x\right )\right )\,\left (2\,a-\pi \right )+2\,b\,x\,\ln \left ({\mathrm {e}}^{-a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-b\,x\,2{}\mathrm {i}}+1\right )+a\,b\,x\,2{}\mathrm {i}}{2\,b^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int x \tan {\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________